﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI;
using Churchtoolkit.Utils.MVP;
using Churchtoolkit.Utils.ErrorProvider;

namespace Churchtoolkit
{
   public static class ValidatorExtension
    {
       public static void Replace(this IValidator validator,string placeHolder,string value)
       {
          Control cValidator = (Control)validator;
          ValidationPlaceHolderPairCollection cValidatorCollection = (ValidationPlaceHolderPairCollection)cValidator.Page.GetType().GetPropertyValue("Collection", cValidator.Page);
          cValidatorCollection.Add(validator, placeHolder, value);
       }
    }
}
